package com.guoyh.pronet.params

import com.guoyh.baserepos.entity.app.UserBean
import com.guoyh.baseutils.utils.MmkvHelper

/**
 * @CreateDate: 2021/8/23 1:58 下午
 * @Author: guoyh
 * @Description: java类作用描述
 */
object AppParams : BaseParams() {


    /**
     * 刷新 Token
     */
    private const val refreshToken_conig = "AppParams_refreshToken"

    var refreshToken: String
        get() {
            return MmkvHelper.instance.get(refreshToken_conig)
        }
        set(value) {
            MmkvHelper.instance.put(refreshToken_conig, value)
        }


    /**
     * Token
     */

    private const val accessToken_config = "AppParams_accessToken"

    var accessToken: String
        get() {
            return MmkvHelper.instance.get(accessToken_config)
        }
        set(value) {
            MmkvHelper.instance.put(accessToken_config, value)
        }


    private const val userInfo_config = "AppParams_userInfo"

    var userInfo: UserBean?
        get() {
            return MmkvHelper.instance.getResult(userInfo_config, UserBean::class.java)
        }
        set(value) {
            MmkvHelper.instance.putResult(userInfo_config, value)
        }


}

